
// Test Data plugin properties
// All or some of these properties can be set based on environment if needed, 
// just follow the convention for how to do that from the standard Config.groovy file.

testDataConfig {
    sampleData = {}
}

// it's likely that you're only using the test data plugin in the test environment, but it's also possible to use it in
// other environments to help quickly create bootstrap data.  If you want that generated data to be environment
// specific, enter it into the section below

environments {
    staging {
    }
    production {
    }
    development {
    }
    test {
        // the following three flags default to false. If they are false, and the build closure encounters
        // one of these constraints on the domain object it is trying to build, an exception will be thrown
        // If it is set to true, an exception will not be thrown, and the assumption is that valid data for that
        // property has been provided in the sampleData (which can be configured here, see below) or
        // passed in to the build closure in a map, eg MyDomain.build([zipCode:'55106-1234'])
//        testDataConfig.applyMatching = true
//        testDataConfig.applyValidator = true
//        testDataConfig.applyUnique = true

        // sample data can be supplied here for matches, custom validator, and unique constraints
        // or for any non-nullable fields for any reasons
        // NOTE: these values will only get applied to non-nullable constraints.
        // nullable constraints are ignored. However, you can pass values for nullable constraints to the
        // build closure and they will get assigned.
        // If the domain object has a default value for a property, the build closure wll not attempt to
        // satisfy the constraint but will respect the default value
        // Values passed to the build closure in a map WILL overwrite default property values
        // testDataConfig.sampleData = {
            // domain name, eg TestDomain
//             TestDomain {
                // property name and a list of values. These values are assigned in the order they are declared
                // to created domain objects as they are built.
                // keep in mind that a whole object graph may get created based on related domain objects
                // so it may be difficult to know when domain objects are created
                // also note that domain objects may get reused in an object graph in order to
                // circumvent circular references
//                 testProperty = ['ABC', 'CDE']
//             }
    }
}


